},
get currentGrab() {
- return this._grabStack[this._grabStack.length - 1] || {};
+ if (!this._grabStack.length)
+ return {};
+
+ let idx = this._grabStack.length - 1;
+ while (idx >= 0 && this._grabStack[idx].untracked)
+ idx--;
+
+ return this._grabStack[idx];
},
_findStackIndex: function(actor) {
// revert it back, and re-focus the previously-focused window (if
// another window hasn't been explicitly focused before then).
//
- //
+ // If @params contains { untracked: true }, then it will be skipped
+ // when the grab helper ungrabs for you, or when calculating
+ // currentGrab.
grab: function(params) {
params = Params.parse(params, { actor: null,
modal: false,
+ untracked: false,
grabFocus: false,
onUngrab: null });
}
this._grabHelper.grab({ actor: this._summaryBoxPointer.bin.child,
+ untracked: true,
grabFocus: true,
onUngrab: Lang.bind(this, this._onSummaryBoxPointerUngrabbed) });
this._lock();